From f444564c73d7c7546d60d2d899a02cf838316c6c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 23 Jun 2011 12:38:40 -0400 Subject: [PATCH] Marking message as "seen" should not mark buffer as changed. --- lisp/ChangeLog | 1 + lisp/mail/rmail.el | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1a64321c5f5..6b5f33a7782 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,7 @@ 2011-06-23 Richard Stallman * mail/rmail.el (rmail-retry-ignored-headers): Add message-id. + (rmail-show-message-1): Preserve buffer modified flag. 2011-06-23 Michael Albinus diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index a65c8376642..33f87d634a3 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2669,8 +2669,11 @@ The current mail message becomes the message displayed." (t (setq rmail-current-message msg))) (with-current-buffer rmail-buffer (setq header-style rmail-header-style) - ;; Mark the message as seen - (rmail-set-attribute rmail-unseen-attr-index nil) + ;; Mark the message as seen, but preserve buffer modified flag. + (let ((modiff (buffer-modified-p))) + (rmail-set-attribute rmail-unseen-attr-index nil) + (unless modiff + (set-buffer-modified-p nil))) ;; bracket the message in the mail ;; buffer and determine the coding system the transfer encoding. (rmail-swap-buffers-maybe) -- 2.30.2